package com.jiutong.meipenggang.ui.fragments;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.jiutong.meipenggang.R;
import com.jiutong.meipenggang.base.BaseFragment;
import com.jiutong.meipenggang.base.CommonAdapter;
import com.jiutong.meipenggang.base.ViewHolder;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;

/**
 * 作用:
 * Created by 78 on 2017/8/11.
 */

public class DayActFragment extends BaseFragment {
    @Bind(R.id.lv_day_act)
    ListView lvDayAct;
    @Bind(R.id.tv_day_cat_no)
    TextView tvDayCatNo;
//    private List<DayActRespond> list;

    @Override
    protected int getLayoutResouceId() {
        return R.layout.fragment_day_act;
    }

    @Override
    protected void initView() {
        super.initView();
//        list = new ArrayList<>();
//
//        list.add(new DayActRespond("美鹏港3%+加息券免费送！","微信专属福利，赶快去绑定！",R.mipmap.hd_day_banner));
//        list.add(new DayActRespond("生财之道（第一期）","月入2000，如何让理财实现梦想！",R.mipmap.hd_day_banner_two));
//        list.add(new DayActRespond("生财之道（第一期）","月入2000，如何让理财实现梦想！",R.mipmap.hd_day_banner_two));
//        if(list==null||list.size()<=0){
//            tvDayCatNo.setVisibility(View.VISIBLE);
//        }else{
//            tvDayCatNo.setVisibility(View.GONE);
//            DayActAdapter adapter = new DayActAdapter(mActivity, list, R.layout.item_day_act);
//            lvDayAct.setAdapter(adapter);
//        }
    }

//    public class DayActAdapter extends CommonAdapter<DayActRespond> {
//        public DayActAdapter(Context context, List<DayActRespond> listDatas, int layoutId) {
//            super(context, listDatas, layoutId);
//        }
//
//        @Override
//        protected void fillData(ViewHolder holder, int position) {
//            TextView tv_first = holder.getView(R.id.tv_item_day_act_first);
//            tv_first.setText(listDatas.get(position).getFirst_text());
//            TextView tv_second = holder.getView(R.id.tv_item_day_act_second);
//            tv_second.setText(listDatas.get(position).getSecond_text());
//            ImageView iv = holder.getView(R.id.iv_item_day_act);
//            iv.setImageResource(listDatas.get(position).getIcon_url());
//        }
//    }

}
